* {
    margin: 0;
    padding: 0;
    list-style: none;
}

html,
body {
    height: 100%
}

body {
    display: flex;
    // 聚焦
    overflow: hidden;
    perspective: 1000px;
}

.pic {
    height: 550px;
    width: 350px;
    margin: auto;
    border-radius: 20px;
    background: url('../img/600x600.jpg') center/cover;
    cursor: pointer;
    position: relative;
    top: 0;
    left: 0;
    transition: all .5s;
    transform-style: preserve-3d;
    transform-origin: 50% 50% 200px;
    color: white;
    display: flex;
    text-align: center;
    flex-direction: column;
    justify-content: center;
    font-family: 'Asar', serif;

    // 伪类函数
    .mask {
        content: "";
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        border-radius: 20px;
        transition: inherit;
    }

    // 遮罩层
    &::before {
        .mask();
    }

    // 盒子特效
    &::after {
        z-index: -1;
        .mask();
        background-color: black;
        box-shadow: 0 0 15px 0 #000;
        transform: translateZ(-20px);
    }

    h2,
    h3 {
        transition: inherit;
        opacity: 1;
    }

    ul {
        width: 70%;
        margin: 30px auto;
        display: flex;
        justify-content: space-between;
        transition: inherit;

        li {
            width: 20px;
            height: 20px;
            background-color: #fff;
            position: relative;
            top: 0;
            left: 0;
            transform: rotate(45deg);
            transform-style: preserve-3d;
            transition: inherit;
            // 立体显示函数
            .stereoBox {
                content: "";
                height: 20px;
                position: absolute;
                bottom: 0;
                left: 0;
                background-color: #b6c0cd;
                transition: inherit;
                transform-origin: 0 100%;
                border: 1px solid #ccc;
                box-sizing: border-box;
            }

            span {
                .stereoBox();
                width: 0px;
                text-align: right;
                transform: rotateY(-90deg) rotateX(-90deg) translateY(20px);
                color: black;
                opacity: 0;
            }

            &::before {
                .stereoBox();
                width: 20px;
                background-color: inherit;
                transform: translateZ(0px);
            }

            &::after {
                .stereoBox();
                width: 0px;
                transform: rotateY(-90deg) translateZ(-20px);
            }
        }

    }

    &.active {
        transform: rotateX(60deg) translate3d(0px, -150px, 80px);

        h2,
        h3 {
            opacity: 0;
        }

        &::before {
            background-color: rgba(10, 44, 119, 0.6);
        }

        ul li {
            transform: rotate(30deg);
            span{
                opacity: 1;
            }
            &:nth-child(1) {
                span,
                &::after {
                    width: 200px;
                }

                &::before {
                    transform: translateZ(200px);
                }
            }
            &:nth-child(2) {
                span,
                &::after {
                    width: 100px;
                }

                &::before {
                    transform: translateZ(100px);
                }
            }
            &:nth-child(3) {
                span,
                &::after {
                    width: 150px;
                }

                &::before {
                    transform: translateZ(150px);
                }
            }
            &:nth-child(4) {
                span,
                &::after {
                    width: 70px;
                }

                &::before {
                    transform: translateZ(70px);
                }
            }
            &:nth-child(5) {
                span,
                &::after {
                    width: 70px;
                }

                &::before {
                    transform: translateZ(70px);
                }
            }
            &:nth-child(6) {
                span,
                &::after {
                    width: 100px;
                }

                &::before {
                    transform: translateZ(100px);
                }
            }
            &:nth-child(7) {
                span,
                &::after {
                    width: 100px;
                }

                &::before {
                    transform: translateZ(100px);
                }
            }
        }
    }
}